using System;
using System.Collections.Generic;
using System.Text;
namespace MyDMS.BusinessLayer
{
	public class JobDescription: BusinessObjectBase
	{

		#region InnerClass
		public enum JobDescriptionFields
		{
			JD_Code,
			JD_Name,
			Job_Description,
			Office_Code,
			Is_Active,
			Creation_Date,
			Updation_Date
		}
		#endregion

		#region Data Members

			int _jD_Code;
			string _jD_Name;
			string _job_Description;
			int? _office_Code;
			bool? _is_Active;
			DateTime? _creation_Date;
			DateTime? _updation_Date;

		#endregion

		#region Properties

		public int  JD_Code
		{
			 get { return _jD_Code; }
			 set
			 {
				 if (_jD_Code != value)
				 {
					_jD_Code = value;
					 PropertyHasChanged("JD_Code");
				 }
			 }
		}

		public string  JD_Name
		{
			 get { return _jD_Name; }
			 set
			 {
				 if (_jD_Name != value)
				 {
					_jD_Name = value;
					 PropertyHasChanged("JD_Name");
				 }
			 }
		}

		public string  Job_Description
		{
			 get { return _job_Description; }
			 set
			 {
				 if (_job_Description != value)
				 {
					_job_Description = value;
					 PropertyHasChanged("Job_Description");
				 }
			 }
		}

		public int?  Office_Code
		{
			 get { return _office_Code; }
			 set
			 {
				 if (_office_Code != value)
				 {
					_office_Code = value;
					 PropertyHasChanged("Office_Code");
				 }
			 }
		}

		public bool?  Is_Active
		{
			 get { return _is_Active; }
			 set
			 {
				 if (_is_Active != value)
				 {
					_is_Active = value;
					 PropertyHasChanged("Is_Active");
				 }
			 }
		}

		public DateTime?  Creation_Date
		{
			 get { return _creation_Date; }
			 set
			 {
				 if (_creation_Date != value)
				 {
					_creation_Date = value;
					 PropertyHasChanged("Creation_Date");
				 }
			 }
		}

		public DateTime?  Updation_Date
		{
			 get { return _updation_Date; }
			 set
			 {
				 if (_updation_Date != value)
				 {
					_updation_Date = value;
					 PropertyHasChanged("Updation_Date");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("JD_Code", "JD_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("JD_Name", "JD_Name"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("JD_Name", "JD_Name",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Job_Description", "Job_Description",500));
		}

		#endregion

	}
}
